Skip to content

Add define for ARDUINO_CORE_STM32 that can be used to identify this Arduino core#262

Closed
ktand wants to merge 1 commit intostm32duino:masterfrom
ktand:core_identifier
Closed

Add define for ARDUINO_CORE_STM32 that can be used to identify this Arduino core#262
ktand wants to merge 1 commit intostm32duino:masterfrom
ktand:core_identifier

Conversation

@ktand
Copy link
Contributor

@ktand ktand commented Jun 10, 2018

It would be nice if it was possible to identify this Arduino core. I have added a define for ARDUINO_CORE_STM32.

@fpistm
Copy link
Member

fpistm commented Jun 10, 2018

Hi @ktand ,
in fact it already exists. Each arduino core define its own define: -DARDUINO_ARCH_{build.arch}
Use ARDUINO_ARCH_STM32

@ktand
Copy link
Contributor Author

ktand commented Jun 11, 2018

Hi @fpistm.

Unfortunately the Platformio framework that has been modified for STM32GENERIC defines the same ARDUINO_ARCH_STM32. I've created a HAL for STM32F4 for the Marlin project using STM32GENERIC but would like to be able use this core as well. Any idea how I could identify this framework without relying on the ARDUINO_ARCH_STM32 define?

@fpistm
Copy link
Member

fpistm commented Jun 11, 2018

Unfortunately, I would not add new define, official one is ARDUINO_ARCH_STM32
This define is used in several third party libraries for this core and do not want multiply define to identify this core.

@ktand
Copy link
Contributor Author

ktand commented Jun 11, 2018

@fpistm I realized that STM32GENERIC defines STM32GENERIC so I can use that define to switch on. I will close this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants